<?php
require 'Conn.php';
$sql="INSERT INTO users(username,password) values(?,?)"; //参数以？代替
$stmt=$db->prepare($sql); //预处理

$username='吴用';
$password='e10adc3949ba59abbe56e057f20f883e';
$stmt->bind_param('ss',$username,$password); //绑定参数
$result=$stmt->execute();

if($result){
    echo "<script>alert('注册成功！');location='Students.php';</script>";
}else{
    echo "<script>alert('注册失败！');location='Register.php';</script>";
}
$db->close();